package DB.dto;

import java.io.Serializable;

public class DrugsDto implements Serializable
{
	/** 
	 * This attribute maps to the column ID_DRUG in the DRUGS table.
	 */
	protected int idDrug;

	/** 
	 * This attribute maps to the column NAME in the DRUGS table.
	 */
	protected String name;

    public void setCathegory(String cathegory) {
        this.cathegory = cathegory;
    }

    public String getCathegory() {

        return cathegory;
    }

    /**
	 * Method 'DrugsDto'
	 * 
	 */
    protected String cathegory;
	public DrugsDto()
	{
	}

	/**
	 * Method 'getIdDrug'
	 * 
	 * @return int
	 */
	public int getIdDrug()
	{
		return idDrug;
	}

	/**
	 * Method 'setIdDrug'
	 * 
	 * @param idDrug
	 */
	public void setIdDrug(int idDrug)
	{
		this.idDrug = idDrug;
	}

	/**
	 * Method 'getName'
	 * 
	 * @return String
	 */
	public String getName()
	{
		return name;
	}

	/**
	 * Method 'setName'
	 * 
	 * @param name
	 */
	public void setName(String name)
	{
		this.name = name;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof DrugsDto)) {
			return false;
		}
		
		final DrugsDto _cast = (DrugsDto) _other;
		if (idDrug != _cast.idDrug) {
			return false;
		}
		
		if (name == null ? _cast.name != name : !name.equals( _cast.name )) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idDrug;
		if (name != null) {
			_hashCode = 29 * _hashCode + name.hashCode();
		}
		
		return _hashCode;
	}

    /**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "DB.dto.DrugsDto: " );
		ret.append( "idDrug=" + idDrug );
		ret.append( ", name=" + name );
		return ret.toString();
	}

}
